<h2>类别列表</h2>

<table>
  <tr>
    <th>名称</th>
  </tr>

  <% for category in @categories %>
    <tr>
      <td><%=h category.title %></td>
      <td><%= link_to '编辑', edit_category_path(category) %></td>
      <td><%= link_to '删除', category, :confirm => '确定删除?', :method => :delete %></td>
    </tr>
  <% end %>
</table>
<div id="pager">
  <%= will_paginate @categories,:prev_label => '«上一页',:next_label => '下一页»' %>
</div>
<%= link_to '新增类别', new_category_path %>
